Make tuple generic in most stubs#3767
Conversation
ilevkivskyi
left a comment
There was a problem hiding this comment.
Thanks! Just two small suggestions.
| @@ -11,7 +11,7 @@ class int: pass | |||
| class str: pass | |||
| class dict: pass | |||
There was a problem hiding this comment.
Maybe you could also fix dict and set (on next line)? There are few of them.
There was a problem hiding this comment.
The idea is that if you also fix few dicts and sets, then we could turn on the asserts that are now commented out.
| class tuple(Generic[T]): pass | ||
| class function: pass | ||
| class ellipsis: pass | ||
| class list: pass |
There was a problem hiding this comment.
It looks like there is still one more tuple not fixed in isinstancelist.pyi.
ilevkivskyi
left a comment
There was a problem hiding this comment.
Thanks! I will merge soon. The next step would be to turn on the asserts that are commented out now.
|
Can you please measure how much slower this made the tests?
…On Jul 26, 2017 3:03 PM, "Ivan Levkivskyi" ***@***.***> wrote:
Merged #3767 <#3767>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3767 (comment)>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ACwrMtHSI54dp01iYwdepyCfsQFQM8Nyks5sR7eugaJpZM4Ojafa>
.
|
Before: 3m7s The full test runs two more seconds, i.e. less than 1% of total time. |
|
OK, that's fine then. In general the tests have become slower over time, in part because mypy itself became slower; but IIRC we had a recent test speedup, and this slowdown is negligible. |
Per @ilevkivskyi suggestion, making tuples generic in stubs to reduce incompatibility between stubs and production.
This is a carve-out from #3129.